<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">  
  <title>歌手详细信息</title>
 </head>
 <body>
 
 <?php
  require_once('inc_admin.php');

  connect();
  //编写sql语句
  $id = $_GET['id'];
  $sql="select * from singer where zqy_id={$id}";

  //echo $sql.'<br/>';  
  $result = fetch_array($sql); 

 ?>

 <center><h3>歌手详细信息</h3></center>
 <table align="center" width="80%" border=1> 
 <tr>
   <th>编号</th>
   <th>歌手名</th>   
   <th>性别</th>
   <th>歌手照片</th>
   <th>歌手简介</th>
   <th>操作</th>
 </tr>

 <?php
  foreach ($result as $row) {
   echo '<tr>';
   echo '<td>'.$row['zqy_id'].'</td>';
   echo '<td>'.$row['zqy_name'].'</td>';
   if($row['zqy_sex']=='0')
  {
    $row['zqy_sex']='男';
  }
     if($row['zqy_sex']=='1')
  {
    $row['zqy_sex']='女';
  }
  echo '<td>'.$row['zqy_sex'].'</td>';  
   echo '<td><img src='.UserPhotoPath.$row['zqy_photo'].' width=100 height=90 alt="无图片"></a></td>';
   echo '<td>'.$row['zqy_intro'].'</td>';
   echo '<td><a href="singerlist.php?id='.$row['zqy_id'].' ">返回</a></td>';
   echo '</tr>';  
  }
  echo '</table>';  
  $totalrows = count($result);
 ?>
 
 </body>
</html>